require(["./config"], () => {
  require(["template", "header", "jquery", "rotation", "countDown", "footer"], (
    template,
    req
  ) => {
    class index {
      constructor() {
        this.init();
      }
      init() {
        this.getList();
      }
      getList() {
        $.get("http://www.xiongmaoyouxuan.com/api/tab/5?start=0", res => {
          if (res.code === 200) {
            this.renderlist(res.data.items.list);
          }
        });
      }
      renderlist(list) {
        $("#commodity_list").html(template("indexHome", { list }));
      }
    }
    return new index();
  });
});
